    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
        <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
        <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
            <%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
        <!DOCTYPE html>
        <html lang="en">
        <head>
        <base href="<%=basePath%>">

        <meta charset="utf-8" />
        <title>菜单</title>
        <meta name="description" content="overview & stats" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <link href="static/css/bootstrap.min.css" rel="stylesheet" />
        <link href="static/css/bootstrap-responsive.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="static/css/font-awesome.min.css" />
        <link rel="stylesheet" href="static/css/ace.min.css" />
        <link rel="stylesheet" href="static/css/ace-responsive.min.css" />
        <link rel="stylesheet" href="static/css/ace-skins.min.css" />
        <script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
        <!--提示框-->
        <script type="text/javascript" src="static/js/jquery.tips.js"></script>
        </head>

        <script type="text/javascript">
        $(top.hangge());
        $(document).ready(function(){
        if($("#id").val()!=""){
        var pid = "${menu.pid}";
        if(pid==""){
        $("#pid").attr("disabled",true);
        }else{
        $("#pid").val(pid);
        }
        }
        setMUR();
        });

        function setMUR(){
        if($("#pid").val()==""){
        $("#url").attr("readonly",true);
        $("#url").val("");
        }else{
        $("#url").attr("readonly",false);
        }
        }

        //保存
        function save(){
        if($("#name").val()==""){
        $("#name").tips({
        side:3,
        msg:'请输入菜单名称',
        bg:'#AE81FF',
        time:2
        });
        $("#name").focus();
        return false;
        }
        if($("#orderNum").val()==""){
        $("#orderNum").tips({
        side: 3,
        msg:'请输入菜单序号',
        bg:'#AE81FF',
        time:2
        });
        $("#orderNum").focus();
        return false;
        }

        if(isNaN(Number($("#orderNum").val()))){
        $("#orderNum").tips({
        side: 3,
        msg:'请输入数字菜单序号',
        bg:'#AE81FF',
        time:2
        });
        $("#orderNum").focus();
        $("#orderNum").val(1);
        return false;
        }

        $("#menuForm").submit();
        $("#zhongxin").hide();
        $("#zhongxin2").show();
        }

        function setType(value){
        $("#type").val(value);
        }

        </script>


        <body>
        <form action="menu/add" name="menuForm" id="menuForm" method="post" >
        <input type="hidden" id="id" value=""/>
        <input type="hidden" name="type" id="type" value=""/>
        <div id="zhongxin" class="zhongxin-cla">
        <table>
        <tr>
        <td>
        <span>上级菜单：</span>
        <select name="pid" id="pid" class="input_txt" onchange="setMUR()" title="菜单">
        <option value="">顶级菜单</option>
        <c:forEach items="${menuList}" var="model">
            <option value="${model.id }" onclick="">${model.name }</option>
        </c:forEach>
        </select>
        </td>
        </tr>
        <tr>
        <td>
        <font color='red'>*</font>
        <span>菜单名称：</span>
        <input type="text" name="name" id="name" placeholder="菜单名称" value="" title="名称"/>
        </td>
        </tr>
        <tr>
        <td>
        <span>链接地址：</span>
        <input type="text" name="url" id="url" placeholder="链接地址" value="" title="地址"/>
        </td>
        </tr>
        <tr>
        <td>
        <font color='red'>*</font>
        <span>排序号：</span>
        <input type="number" name="orderNum" id="orderNum" placeholder="序号" value="" title="序号"/>
        </td>
        </tr>
        <tr>
        <td style="text-align: center;">
        <label style="float:left;padding-left: 32px;">
        <input name="form-field-radio" id="form-field-radio1" onclick="setType('1');" type="radio" value="icon-edit">
        <span class="lbl">路径</span>
        </label>
        <label style="float:left;padding-left: 5px;">
        <input name="form-field-radio" id="form-field-radio2" onclick="setType('2');" type="radio" value="icon-edit">
        <span class="lbl">菜单</span>
        </label>
        <label style="float:left;padding-left: 5px;">
        <input name="form-field-radio" id="form-field-radio3" onclick="setType('3');" type="radio" value="icon-edit">
        <span class="lbl">按钮</span>
        </label>
        </td>
        </tr>
        <tr>
        <td style="text-align: center; padding-top: 10px;">
        <a class="btn btn-mini btn-primary" onclick="save();">保存</a>
        <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
        </td>
        </tr>
        </table>
        </div>
        <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><img src="static/images/jiazai.gif"
        /><br/><h4 class="lighter block green"></h4></div>
        </form>
        </body>
        </html>